<?php

namespace App\Admin\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Admin\Models\Users;
use App\Admin\Models\Goods;
class Commission extends Authenticatable
{
    use Notifiable;

    protected $table = 'users_commission';

    public function user() {
        return $this->belongsTo(Users::class, 'user_id', 'id');
    }
    public function goods(){
        return $this->belongsTo(Goods::class,'goods_id','id');
    }

    public function users() {
        return $this->belongsTo(Users::class, 'buy_user_id', 'id');
    }
}
